{% extends "kit" %}

{% block main %}
    <h2>Kit {{ kit.getid }} {{ kit.getversion }} </h2>
    <p>{{ kit.getdescription }}</p>

{% include "_kit_status" %}

{% endswitch %}

    <p>{{ cfg.kit.desc }}</p>

    {% if kit.link %}<p><a href="{{ kit.link }}">web site</a></p>{% endif %}

    {% if kit.phpversion %}
        <p>PHP versions supported : {{ kit.phpversion }}</p>
    {% endif %}

    {% if kit.listsubkits %}<div class="subkits">
    <h3>Kits inclus</h3>
    {% include "kitlist" kits=kit.getsubkits %}</div>{% endif %}

    {% include "_addkitform" %}

    {% if kit.getdependencies %}<div class="dependencies">
    <h3>Kits requis</h3>
    {% include "kitlist" kits=kit.getdependencies %}{% comment %}{% endcomment %}
    </div>{% endif %}

    {% if kit.getfiles %}<div class="classes">
    <h3>Fichiers inclus</h3>
    <dl>{% for file in kit.getfiles %}
        <dt>{{ file }}</dt>{% endfor %}
    </dl>
    </div>{% endif %}

    {% if kit.getclasses %}<div class="classes">
    <h3>Classes incluses</h3>
    <dl>{% for file in kit.getclasses %}
        <dt>{{ forloop.key }}</dt>
        <dd>{{ file }}</dd>{% endfor %}
    </dl>
    </div>{% endif %}

    <form action="kit/{{ kit.getid }}/addfile" method="post" enctype="multipart/form-data">
        <fieldset>
            <legend>Ajouter une librairie</legend>
            {{ addfile.asp }}
        </fieldset>
        <p class="submit">
            <input type="submit" value="Importer" />
        </p>
    </form>

    <pre>{{ kit._cfg }}</pre>
{% endblock %}
